/*
 * @Author: LGX
 * @Date: 2022-03-31 12:29:58
 * @LastEditors: LGX
 * @LastEditTime: 2022-03-31 12:46:54
 * @FilePath: \erp-management-system\src\router\announcementRouter.js
 * @Description: 内部公告路由
 * 
 */
import { Suspense, lazy } from 'react'
const lazyComponent = (path) => {
    const Lazy = lazy(() => import(`../views/announcement/${path}`))
    return <Suspense fallback={<div>Loading...</div>}>
        <Lazy />
    </Suspense>
}
const announcementRouter = [
    {
        path: '/announcement',
        title: '内部公告',
        children: [
            {
                path: '/announcement/list',
                title: '公告列表',
                element: lazyComponent('AnnouncementList')
            },
            {
                path: '/announcement/add',
                title: '发布公告',
                element: lazyComponent('AnnouncementAdd')
            },
        ]
    }
]
export default announcementRouter